﻿<?php
include_once(dirname(__FILE__).'/../class/SubTree.class.php');
include_once(dirname(__FILE__).'/../class/Subitem.class.php');

if($_GET['hastypes'] == 0)
{
    $sub_tree = new SubTree($_GET['pid']);
    die($sub_tree->create());
}
else if($_GET['hastypes'] == 1)
{
    $sub_item = new SubItem($_GET['pid']);
    die($sub_item->create());
}
?>
